home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 4 / FM Towns Free Software Collection 4 - Disc 1.iso / t_os / helper / source / graphic.h < prev    next >
Text File  |  1991-10-18  |  2KB  |  81 lines

  1. /*
  2.  *    GRAPHIC.H
  3.  */
  4.  
  5. #define    ON        1
  6. #define    OFF        0
  7.  
  8. #define    M_PSET        0
  9. #define    M_XOR        4
  10.  
  11. #define    MOS_NOMAL    0
  12. #define    MOS_HAND    1
  13. #define    MOS_WAIT    2
  14. #define    MOS_3        3
  15. #define    MOS_4        4
  16.  
  17. #define    IS_FLP        '\x00'
  18. #define    IS_EFLP        '\x01'
  19. #define    IS_SCSI        '\x02'
  20. #define    IS_RAM        '\x03'
  21. #define    IS_MDC        '\x04'
  22. #define    IS_ROM        '\x05'
  23. #define    IS_CDR        '\x06'
  24. #define    IS_NON        '\xFF'
  25.  
  26. typedef struct {
  27.     char        *ptn;
  28.     short int   sel;
  29.     short int   x1,y1;
  30.     short int   x2,y2;
  31.     char        img[1];
  32. } BLOCK;
  33.  
  34. void    DSP_mos(int no);
  35. BLOCK    *DSP_push_vram(int x1,int y1,int x2,int y2);
  36. void    DSP_pop_vram(BLOCK *para);
  37. void    DSP_putptn(char *p,int x1,int y1,int x2,int y2,int fc,int bc,int md);
  38. void    DSP_msg(char *str,int x,int y,int font,int fc,int bc,int mod);
  39. void    DSP_line(int x1,int y1,int x2,int y2,int col,int mod);
  40. void    DSP_box(int x1,int y1,int x2,int y2,int col,int mod);
  41. void    DSP_rbox(int x1,int y1,int x2,int y2,int lin,int col,int mod);
  42. void    DSP_wbox(int x1,int y1,int x2,int y2,int lin,int col,int mod);
  43. void    DSP_opbox(int x1,int y1,int x2,int y2);
  44. void    DSP_clbox(int x1,int y1,int x2,int y2);
  45. void    DSP_offset(int page,int x,int y);
  46. void    DSP_clear(int page);
  47. void    DSP_init(void);
  48. void    DSP_end(void);
  49. void    ICON_init(void);
  50. void    ICON_disp(int x,int y,int drv);
  51.  
  52. void    wrtstr(char *str,int page,int x,int y,
  53.            int chrcol,int bakcol,int fsiz);
  54. void    putstr(char *str,int page,int y);
  55. void    ctblset(int chrcol,int bakcol);
  56. void    vram_offset(int reg,int ofs);
  57. int    sjistojis(int jis);
  58. int    peek(int port);
  59.  
  60. void    gprintf(int x,int y,int c,int b,char *form,...);
  61. void    gputs(int x,int y,int c,int b,char *str);
  62.  
  63. extern char    kantbl[256];
  64. extern int    tick_timer;
  65. extern int    now_mos;
  66. extern char    drv_tbl[];
  67.  
  68. #ifdef    iskanji
  69.     #undef iskanji
  70. #endif
  71.  
  72. #ifdef    iskanji2
  73.     #undef iskanji2
  74. #endif
  75.  
  76. #define    ISKAN1    1
  77. #define    ISKAN2    2
  78.  
  79. #define    iskanji(c)    (kantbl[(unsigned char)c]&ISKAN1)
  80. #define    iskanji2(c)    (kantbl[(unsigned char)c]&ISKAN2)
  81.